function countdown(that) {
  var countDownNum = that.data.countDownNum
  var jog = that.data.jog
  var hiddenName = that.data.hiddenName
  if (countDownNum == 0) {
    that.setData({
      countDownNum: "3秒倒计时结束",
      jog: false,
      hiddenName: true
    });
    return;
  }
  var time = setTimeout(function () {
    that.setData({
      countDownNum: countDownNum - 1
    });
    countdown(that);
  }
    , 1000)
}
Page({
  data: {
    countDownNum: 3,
    jog: true,
    hiddenName: false
  },
  onLoad() {
    countdown(this)
  },
  onShareAppMessage: function () {

  },
  gotoback(){
    wx.switchTab({
      url: '/page/BusinessCenter/index',
      success: function(res) {},
      fail: function(res) {},
      complete: function(res) {},
    })
  }
})